package com.xlro.service;

import com.xlro.dao.UserDao;
import com.xlro.domain.User;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class UserServiceTest {

    UserDao userDao = new UserDao();
    @Test
    public void getUser() {
    }

    @Before
    public void setUp() throws Exception {
        System.out.println("测试开始");
    }

    @After
    public void tearDown() throws Exception {
        System.out.println("测试结束");
    }

    @Test
    public void testGetUser() {
        for (User u:userDao.getAll()
        ) {
            System.out.println(u.getUsername());
//            if(("123".equals(u.getUsername()))){
//            }
        }
    }

    @Test
    public void alterInfo() {
        System.out.println(new UserService().alterInfo("16", "12", "1", "1", "1", "1", "1"));
    }
}